package com.weijian.dal.dto.user;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

/**
 * 用户登录请求DTO
 *
 * @author weijian
 * @since 2024-12-20
 */
@Data
@Schema(description = "用户登录请求对象")
public class UserLoginRequest {

    @Schema(description = "用户名或邮箱", example = "weijian 或 weijian@example.com", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "用户名或邮箱不能为空")
    private String usernameOrEmail;

    @Schema(description = "登录密码", example = "123456", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "密码不能为空")
    private String password;

    /**
     * 是否记住我（7天免登录）
     */
    @Schema(description = "是否记住登录状态", example = "false", defaultValue = "false")
    private boolean rememberMe = false;
}